define(['app'],function(app){return {module: function($scope, $http, eventBusService, httpService, params, configService) {
	$scope.form = {};

	$scope.saveForm = function(){
		if($scope.formCheck()){
			httpService.post(app.urls.api_updateApiParam, $scope.form, function(data) {
				if ("0000" === data.code) {
					eventBusService.publish("content.page.reloadin",data.data);
					eventBusService.publish("modal.page.close",{});
				} else {
					alert(data.msg);
				}
			});
		}
	}

	var init = function(){
		$scope.form.param_pk = params.pk;
		httpService.post(app.urls.api_selectApiParam, $scope.form, function(data) {
			if ("0000" === data.code) {
				$scope.form = data.data[0];
			} else {
				alert(data.msg);
			}
		});
	}
	
	init();

}}});